#ifndef __AttackButton_H__
#define __AttackButton_H__
#include "cocos2d.h"
#include <functional>
using namespace std;
USING_NS_CC;
class CAttackButton : public Node
{
public:
	CAttackButton();
	~CAttackButton();

	CREATE_FUNC(CAttackButton);
	virtual bool init();
	void addAttackEvent(function<void()> attackEvent);
	bool onButtonTouchBegin(Touch* touch,Event* event);

private:
	function<void()> m_attackEvent;
	Sprite* m_pBackground;
	Sprite* m_pAttackPic;
	Size visibleSize;
	Vec2 origin;

};



#endif